package com.datang.springcode.autowiredInject1;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class Airplane {
    @Autowired
    public Law law;
    @Autowired(required = false)
    public Train train;

    public Law law2;

    public Train train2;

    public Airplane() {
    }

    @Autowired(required = false)
    public Airplane(Law law2, Train train2) {
        this.law2 = law2;
        this.train2 = train2;
    }

}
